package com.crm.dao.mapper.customMapper.userForumCustomManager;

import com.crm.model.vo.userForumManager.UserForumReplyVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Author:chaifuyou
 * @Date: 2021/5/24 9:46
 */
public interface UserForumReplyCustomMapper {

    /**
     * 查看评论
     * @param userForumId
     * @param order
     * @return
     */
    List<UserForumReplyVO> selectForumReply(@Param("userForumId") String userForumId, @Param("order")String order);

    /**
     * 查看子评论
     * @param userForumReplyId
     * @param order
     * @return
     */
    List<UserForumReplyVO> selectForumSonReply(@Param("userForumReplyId") String userForumReplyId, @Param("order") String order);

    /**
     * 加阅读次数
     * @param userForumId
     */
    void addReadNumberByUserForumId(@Param("userForumId") String userForumId);

    /**
     * 通过评论级别和pid查询评论
     * @param level
     * @param order
     * @param limit
     * @param pid
     * @return
     */
    List<UserForumReplyVO> selectForumReplyByLevel(@Param("level") Integer level,
                                                   @Param("order") String order,
                                                   @Param("limit") Integer limit,
                                                   @Param("pid") String pid,

                                                   @Param("userForumId") String userForumId);

    /**
     * 通过评论级别和pid查询评论
     * @param level
     * @param order
     * @param limit
     * @param pid
     * @param userForumId
     * @return
     */
    List<UserForumReplyVO> selectForumReplyByPid(@Param("level") Integer level,
                                                 @Param("order") String order,
                                                 @Param("limit") Integer limit,
                                                 @Param("pid") String pid,
                                                 @Param("userForumId") String userForumId);

    /**
     * 根据评论id查询
     * @param userForumReplyId
     * @return
     */
    UserForumReplyVO selectForumReplyById(@Param("userForumReplyId") String userForumReplyId);

    /**
     * 删除评论
     * @param userForumReplyId
     * @return
     */
    Integer delForumReply(@Param("userForumReplyId") String userForumReplyId);
}
